<?php 

//Now import the settings
include_once("settings.php");

//Connect to the db
mysql_connect($db_host,$MySqlUN,$MySqlPW);
@mysql_select_db($database) or die( "Unable to select databases");


$sql="INSERT INTO Contacts (Name,Title,Company,Address1,Address2,City,State,Zip,Phone,Ext,Fax,Email,Website,Comments)
VALUES
('$_POST[name]','$_POST[title]','$_POST[company]','$_POST[add1]','$_POST[add2]','$_POST[city]','$_POST[state]','$_POST[zip]','$_POST[phone]','$_POST[ext]','$_POST[fax]','$_POST[email]','$_POST[website]','$_POST[comments]')";

if (!mysql_query($sql))
  {
  die('Error: ' . mysql_error());
  }
else
{
header("Location:contact_us.php");
}
//send mail

/*$to = $_POST["email"];
$from = "anujakoli@sarpika.com";
$subject = "AutoResponder";
$message = "Thanks for ur concern";
$headers = "From: " . $from . "\r\n";
$mailsent = mail($to,$subject,$message,$headers);

if(!$mailsent) 
{
 echo "There was an error...";
}
else
{
header("Location:contact_us.php");
}*/
?>